package co.com.sigma.ceplex.controller.bo;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import co.com.sigma.ceplex.model.GisParameter;
import co.com.sigma.ceplex.model.GisQuery;
import co.com.sigma.ceplex.model.GisService;
import co.com.sigma.ceplex.model.GisWidget;
import co.com.sigma.ceplex.model.dao.CustomHibernateDao;

@Service
public class GisServiceBo {

	@Resource
	private CustomHibernateDao dao;

	public List<GisService> getListService() {
		return dao.find("from GisService o Order by o.gisOrder");
	}
	
	public List<GisParameter> getListParameter() {
		return dao.find(GisParameter.class);
	}
	
	public List<GisWidget> getListWidget() {
		return dao.find("from GisWidget o Order by o.gisOrder");
	}
	
	public List<GisQuery> getListQuery() {
		return dao.find(GisQuery.class);
	}
	
	public List<GisQuery> getListQuery(String gisName) {
		return dao.find("from GisQuery o where o.gisName = '" + gisName + "'");
	}

}
